//
//  UIButton+CFAddition.m
//  SwiftWB
//
//  Created by 冯 on 2017/4/10.
//  Copyright © 2017年 CoderFeng. All rights reserved.
//

#import "UIButton+CFAddition.h"

@implementation UIButton (CFAddition)

+ (instancetype)cf_textButton:(NSString *)title fontSize:(CGFloat)fontSize normalColor:(UIColor *)normalColor selectedColor:(UIColor *)selectedColor {
    
    UIButton *button = [[UIButton alloc] init];
    //    button.highlighted = NO;
    //    button.showsTouchWhenHighlighted = YES;
    
    [button setTitle:title forState:UIControlStateNormal];
    
    [button setTitleColor:normalColor forState:UIControlStateNormal];
    [button setTitleColor:selectedColor forState:UIControlStateSelected];
    
    button.titleLabel.font = [UIFont systemFontOfSize:fontSize];
    
    [button sizeToFit];
    
    return button;
}

@end
